package com.icoopoo.modules.staticTest.web;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping("static")
public class StaticController {
	
	private static int testStaticArgc = 0;
	
	@ResponseBody
	@RequestMapping(value = "/static",method = RequestMethod.GET)
	public Map<String, Object> findStaticArgs(HttpServletRequest request, HttpServletResponse response) {
		Map<String,Object> result = new HashMap<String, Object>();
		//e.printStackTrace();
		result.put("RESULT_CODE", "1");
		result.put("RESULT_MSG", "系统异常！");
		System.out.println("**********测试静态变量的值，spring的单例模式 测试  **************");
		testStaticArgc++;
		System.out.println("testStaticArgc =" + testStaticArgc);
		System.out.println("************************");
		return result;
	}

}
